﻿
using Entity;
using System.Runtime.CompilerServices;
using System.Security.Principal;

namespace Bll
{
    /// <summary>
    /// 角色业务逻辑接口
    /// </summary>
    public interface IRoleInfoBll
    {
        /// <summary>
        /// 为角色绑定用户
        /// </summary>
        /// <param name="roleId"></param>
        /// <param name="UserIds"></param>
        /// <returns></returns>
        bool BindUserInfo(string roleId, List<string> userIds);

        /// <summary>
        /// 获取穿梭框的备选数据，和已绑定的用户数据
        /// </summary>
        object GetBindUserInfo(string roleId);

        /// <summary>
        /// 创建角色
        /// </summary>
        /// <param name="account"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public bool CreateRoleInfo(string roleName, string description, out string msg);



        /// <summary>
        /// 软删除角色
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool DeleteRoleInfo(string id);

        /// <summary>
        /// 批量软删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public bool DeleteRoleInfos(List<string> ids);


        /// <summary>
        /// 根据角色id获取角色信息
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        public RoleInfo GetRoleInfoById(string roleId);


        /// <summary>
        /// 获取角色集合
        /// </summary>
        public object GetRoleInfoList(string roleName, int page, int limit, out int count);

        ///// <summary>
        ///// 获取下拉选备选数据
        ///// </summary>
        //object GetSelectOptionList(string roleId);

        /// <summary>
        /// 更新角色
        /// </summary>
        /// <param name="roleId"></param>
        /// <param name="roleName"></param>
        /// <param name="description"></param>
        /// <returns></returns>
        public bool UpdateRoleInfo(string roleId, string roleName, string description,out string msg );

        /// <summary>
        /// 为角色解除绑定用户
        /// </summary>
        /// <param name="roleId"></param>
        /// <param name="userIds"></param>
        /// <returns></returns>
        bool UnbindUserInfo(string roleId, List<string> userIds);

        /// <summary>
        /// 获取穿梭框的备选数据，和已绑定的菜单数据
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        object GetBindMenuInfo(string roleId);

        /// <summary>
        /// 为角色解除绑定菜单
        /// </summary>
        /// <param name="roleId"></param>
        /// <param name="menuIds"></param>
        /// <returns></returns>
        bool UnbindMenuInfo(string roleId, List<string> menuIds);

        /// <summary>
        /// 为角色绑定菜单
        /// </summary>
        /// <param name="roleId"></param>
        /// <param name="menuIds"></param>
        /// <returns></returns>
        bool BindMenuInfo(string roleId, List<string> menuIds);
    }
}